package ch.ethz.fcl.metrobuzz.controller.gui.twl.frames;

import ch.ethz.fcl.metrobuzz.controller.MBController;
import de.matthiasmann.twl.DialogLayout;
import de.matthiasmann.twl.Label;

public class InformationFrame extends MBFrame {
	public InformationFrame(MBController control) {
		super.create(control, "Singapore MRT Interchange Visualization");
	}

	@Override
	protected void setLayout() {
		Label mapNavigation = new Label("Map Navigation:\n"
				+ "1.\tOne finger for track;\n" + ""
				+ "2.\tTwo fingers for zoom\n");
		Label interchangeView = new Label("Interchange View:\n"
				+ "1.\tClick MRT to see interchange patterns;\n" + ""
				+ "2.\tDrag left/right to see temporal changes\n");
		Label timeControl = new Label("Time Control:\n"
				+ "Open time frame to control the time");

		mapNavigation.setTheme("/text");
		interchangeView.setTheme("/text");
		timeControl.setTheme("/text");
		DialogLayout.Group hGroup = layout.createParallelGroup()
				.addWidget(mapNavigation).addWidget(interchangeView)
				.addWidget(timeControl);

		DialogLayout.Group vGroup = layout.createSequentialGroup()
				.addWidget(mapNavigation).addWidget(interchangeView)
				.addWidget(timeControl);

		layout.setHorizontalGroup(hGroup);
		layout.setVerticalGroup(vGroup);
	}
}
